package com.jml.zookeeper.二期.创建节点;

import static java.util.stream.Collectors.toList;

import java.util.ArrayList;
import java.util.List;

/**
 * @author:jml
 * @date: 2019/12/9 14:00 @description：
 */
public class Student {

    private Integer id;

    private String name;
	
	public Student(Integer id, String name) {
		this.id = id;
		this.name = name;
	}
	
	public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
	
	
	public static void main(String[] args) {
		ArrayList<Student> s = new ArrayList<>();
		Student s1 = new Student(1, "ll1");
		Student s2 = new Student(1, "ll2");
		s.add(s1);
		s.add(s2);
		
		List<Integer> invoiceIds =s.stream().map(Student::getId).collect(toList());
		
	}
}
